package com.service;

import java.util.List;

import com.crm.customer.model.Customer;
import com.dao.CustomersDAO;

public class CustomerService {
	
	public List<Customer> queryCustomer()  {
		CustomersDAO dao = new CustomersDAO();
		List<Customer> customers = dao.getAllCustomers();
		return customers;
	}

	public boolean addCustomer(Customer customer) {
		CustomersDAO dao = new CustomersDAO();
        return dao.addCustomer(customer);
	}
	
	public boolean deleteCustomer(String customer_id) {
		CustomersDAO dao = new CustomersDAO();
        return dao.deleteCustomer(customer_id);
	}
	
	public Customer findSingleCustomer(String customer_id) {
		CustomersDAO dao = new CustomersDAO();
        return dao.findSingleCustomer(customer_id);
	}
	public boolean editCustomer(Customer customer) {
		CustomersDAO dao = new CustomersDAO();
        return dao.editCustomer(customer);
	}
	
}

